import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import pandas as pd

dataset = pd.read_csv('./ingotRate.csv')
X = dataset.iloc[:, :-1]
y = dataset.iloc[:, dataset.shape[1] - 1]

for i in range(0,y.shape[0]):
    if y[i]<0.87:
        for j in range(0,3):
            # newLine=[None for _ in range(0,15)]
            # newLine[0]=round(X.values[i][0]+(np.random.random()*2-1)*0.05,2)
            # newLine[1]=round(X.values[i][1]+(np.random.random()*2-1)*0.05,2)
            # newLine[2]=round(X.values[i][2]+(np.random.random()*2-1)*0.05,2)
            # newLine[3]=round(X.values[i][3]+(np.random.random()*2-1)*0.05,2)
            # newLine[4]=round(X.values[i][4]+(np.random.random()*2-1)*0.05,2)
            # newLine[5]=round(X.values[i][5]+(np.random.random()*2-1)*0.05,2)
            # newLine[6]=round(X.values[i][6]+(np.random.random()*2-1)*0.05,2)
            # newLine[7]=round(X.values[i][7]+(np.random.random()*2-1)*0.05,2)
            # newLine[8]=round(X.values[i][8]+(np.random.random()*2-1)*0.01,3)
            # newLine[9]=round(X.values[i][9]+(np.random.random()*2-1)*0.01,3)
            # newLine[10]=round(X.values[i][10]+(np.random.random()*2-1)*0.01,3)
            # newLine[11]=round(X.values[i][11]+(np.random.random()*2-1)*0.05,2)
            # newLine[12]=round(X.values[i][12]+(np.random.random()*2-1)*0.01,2)
            # newLine[13]=round(X.values[i][13]+(np.random.random()*2-1)*0.01,2)
            # newLine[14]=round(y[i]+(np.random.random()*2-1)*0.01,3)
            # dataset.loc[dataset.shape[0]]=newLine
            dataset.loc[dataset.shape[0]] = y[i]

print(dataset)
dataset.to_csv('./newIngotRate_copyLowPoint.csv',index=None)